package com.bos.service.impl;

import com.bos.data.model.ProjectPropertyHistoryModel;
import com.bos.data.model.ProjectPropertyModel;
import com.bos.mapper.Project_proMapper;
import com.bos.service.ProjectPropertyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class ProjectPropertyServiceImpl implements ProjectPropertyService {
    @Autowired
    private Project_proMapper project_proMapper;

    public List<ProjectPropertyModel> getAllProperty() {
        return project_proMapper.getAllPropert();
    }

    @Override
    public int delById(int id) {
        return project_proMapper.delById(id);
    }

    @Override
    public List<ProjectPropertyHistoryModel> getAllPropertyHistory(){
        return project_proMapper.getAllPropertyHistory();
    }

    @Transactional
    @Override
    public int delHistoryById(int id){
        return project_proMapper.delHistoryById(id);
    }
}
